<template>
    <div class="main-container" id="main-container">
    <div style="background-color: #fff;height:100%;"  id="ProductMasterData"> 
            <a-tabs   :lazy-load="true" type="card"  @change="tabsChange" justify>
                <a-tab-pane title="中检查布登记" key="1">
                    <div style="height:100%;">
                        <IntermediateLayout></IntermediateLayout>
                    </div>
                </a-tab-pane>
                <a-tab-pane title="试纱验布登记" key="2">
                        <div style="height:100%;">
                            <TestYarnRegistration v-if="pageData.fectToday2"></TestYarnRegistration>
                        </div>
                </a-tab-pane>
                <a-tab-pane title="中检异常质量登记" key="3">
                    <div style="height:100%;">
                        <AbnormalQualityRegistration v-if="pageData.fectToday3"></AbnormalQualityRegistration>
                    </div>
                </a-tab-pane>
                <!-- <a-tab-pane title="流转卡调整列表" key="4">
                        <div style="min-height: 100px">
                            <AdjustmentOfCirculationCard v-if="pageData.fectToday4"></AdjustmentOfCirculationCard>
                        </div>
                </a-tab-pane> -->
                <a-tab-pane title="批色开方" key="5">
                        <div style="height:100%;">
                            <BatchColorFormula v-if="pageData.fectToday5"></BatchColorFormula>
                        </div>
                </a-tab-pane>
                <a-tab-pane title="中检对色" key="6">
                        <div style="height:100%;">
                            <InspectionAndColorMatching v-if="pageData.fectToday6"></InspectionAndColorMatching>
                        </div>
                </a-tab-pane>
                <a-tab-pane title="配方领料" key="7">
                        <div style="height:100%;">
                            <RecipePicking v-if="pageData.fectToday7"></RecipePicking>
                        </div>
                </a-tab-pane>
            </a-tabs>
        </div>
   
    </div>
</template>

<script lang="ts">
 
 import { defineComponent,reactive, ref } from 'vue'

import emitter from '@/hooks/useEventBus'
   export default defineComponent({
       name:'IntermediateInspectionManagement',
       setup(){
        
     
       const pageData = reactive({
            tableIndex:"1",
            fectToday2: false,
            fectToday3: false,
            fectToday4: false,
            fectToday5: false,
            fectToday6: false,
            fectToday7: false
       })

  
       const tabsChange = (e:string|number)=>{
           pageData.tableIndex = e as string
           let name = 'fectToday' + e
           if (e != '1') {
                pageData[name] = true
            }  
       }
        return{
            pageData,
            tabsChange
        }
       }
   })
</script>
<style scoped>
    .main-container{
        height: 100%;
    }
</style>